package com.hyf.dagger2.di.component;

import com.hyf.dagger2.app.Dagger2Application;
import com.hyf.dagger2.di.module.AppModule;
import com.hyf.dagger2.di.module.BaseAllActivityModule;

import javax.inject.Singleton;

import dagger.Component;
import dagger.android.AndroidInjectionModule;
import dagger.android.support.AndroidSupportInjectionModule;

/**
 * Created by HyFun on 2018/11/20.
 * Email: 775183940@qq.com
 * Description:
 */
@Singleton
@Component(modules = {
        AndroidInjectionModule.class,
        AndroidSupportInjectionModule.class,
        AppModule.class,
        BaseAllActivityModule.class
})
public interface AppComponent {
    /**
     * 注入WanAndroidApp实例
     *
     * @param wanAndroidApp WanAndroidApp
     */
    void inject(Dagger2Application wanAndroidApp);

    /**
     * 提供App的Context
     *
     * @return GeeksApp context
     */
    Dagger2Application getContext();
}
